<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<script src="js/vue.min.js" type="text/javascript" charset="utf-8"></script>
	</head>
	<body>
		<div id="container">
			性别: 
			<span v-if="gender == 1 ">男</span>
			<span v-else-if="gender == 2 ">女</span>
			<span v-else>保密</span>
			<hr/>
			性别:
			<template v-if="gender == 1 ">男</template>
			<template v-else-if="gender == 2 ">女</template>
			<template v-else>保密</template>
		</div>
		<script type="text/javascript">
			var app = new Vue({
				el:"#container",
				data:{
					gender:1
				}
			})
		</script>
	</body>
</html>
